package com.lc202407;

public class Solution771 {
    public int numJewelsInStones(String jewels, String stones) {
        int index = 0;
        for (int i = 0; i < stones.length(); i++) {
            if (jewels.contains(stones.substring(i, i + 1))) {
                index++;
            }
        }
        return index;
    }
}
